package yifeng.spring.ioc;

import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.xml.XmlBeanFactory;
import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.Resource;

public class MainUsingBeanFactory {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		
		Resource re = new ClassPathResource("yifeng/spring/ioc/appcontext.xml");
		BeanFactory bf = new XmlBeanFactory(re);
		
		
		System.out.println(((XmlBeanFactory)bf).isCacheBeanMetadata());
		Hello hello = (Hello)bf.getBean("hello");
		
		hello.sayHello();

	}

}
